Set memo's visible false at END of report in script code?

Got a very large report i've been working on for about 3 months off and on.

Now that it is almost done, request is to now so any value of 0.00 to just not be visible. Don't like it myself visually, but its what quite a few customers are demanding. (will be optional)

Working with the Fast Script code inside the report itself is where I am struggling.

Is there a good way of doing this at the very end of the report generation to scan through all objects in the generated report,
if its a TFRXMemoView object to then check its value... if it is 0.00 then set it to visible = false ?

Comments

  • gpigpi
    edited 11:59PM
    TfrxMemoView.HideZeros = True
  • edited 11:59PM
    gpi wrote: »
    TfrxMemoView.HideZeros = True

    Ah dang it! Sitting there in front of me the whole time.... Guess I never paid attention to it as never needed it until someone asked, when I am almost done with the report.

    Well that is not to bad.. just modify all these fields to have that turned on, and should be good to go then >
  • edited 11:59PM
    This worked well.

    I modified all the fields that need the "HideZeros"

    I have a dialog at the start of the report to put in date ranges and few other things a user must do before kicking off report.

    I added a checkbox for ability to hide the zeros (which is defaultly done by the designer changes now)

    So if user wants to show those zeros, check box off
    var
        idx : integer;
        o : tobject;
        m : tfrxmemoview;                                          
    begin
    
     if ck_HideZeros.checked = false then
     begin             
      for idx := 0 to report.allobjects.count-1 do
       begin
        o := report.allobjects.items[idx];
        if o is tfrxmemoview then
         begin
          m := tfrxmemoview(o);
          if m.hidezeros = true then
           m.hidezeros := false;                                                             
         end;              
       end;
     end;
    

    So it find any Tfrxmemoview's that were set to HideZeros = true , and sets that back to false.
    Works like a champ >
  • PolomintPolomint Australia
    edited 11:59PM
    Very neat. [img]style_emoticons/<#EMO_DIR#>/cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> That points me in the right direction to solve a quibble our users have ... Cheers, Paul[/img]

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.